package com.gitee.simpleplus.utils;

public class TupleUtil {

	public static <M, N> Tuple2<M, N> build(M m, N n) {
		return new Tuple2<M, N>(m, n);
	}

	public static <M, N, O> Tuple3<M, N, O> build(M m, N n, O o) {
		return new Tuple3<M, N, O>(m, n, o);
	}

	public static class Tuple2<M, N> {
		private M m;
		private N n;

		public Tuple2(M m, N n) {
			super();
			this.m = m;
			this.n = n;
		}

		public M getM() {
			return m;
		}

		public void setM(M m) {
			this.m = m;
		}

		public N getN() {
			return n;
		}

		public void setN(N n) {
			this.n = n;
		}

	}

	public static class Tuple3<M, N, O> {
		private M m;
		private N n;
		private O o;

		public Tuple3(M m, N n, O o) {
			super();
			this.m = m;
			this.n = n;
			this.o = o;
		}

		public M getM() {
			return m;
		}

		public void setM(M m) {
			this.m = m;
		}

		public N getN() {
			return n;
		}

		public void setN(N n) {
			this.n = n;
		}

		public O getO() {
			return o;
		}

		public void setO(O o) {
			this.o = o;
		}

	}

}